{% extends 'base.html' %}
{% block content %}

<h3>用户中心</h3>

<img src="{{ current_user.avatar or url_for('static', filename='default_avatar.png') }}" alt="头像" width="120"><br><br>

<div class="card card-body">
    <h2>上传头像</h2>
    <form method="post" enctype="multipart/form-data">
        <input type="file" name="avatar" required>
        <button type="submit">上传</button>
    </form>
</div>

{% endblock %}